home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 January
/
CHIP_CD_2005-01.iso
/
service
/
winamp
/
files
/
winamp505_strata.exe
/
$R0
/
Winamp Modern
/
mainmenu.m
< prev
next >
Wrap
Text File
|
2004-07-01
|
1KB
|
47 lines
#include <lib/std.mi>
#include "attribs.m"
System.onScriptLoaded() {
initAttribs();
menubar_main_attrib.onDataChanged();
}
menubar_main_attrib.onDataChanged() {
Group Player = getscriptgroup().findobject("player.content.dummy.group");
Group MenuBar = getscriptgroup().findobject("wasabi.menubar");
if (getData() == "1") {
Player.setXmlParam("y","0");
MenuBar.show();
} else {
Player.setXmlParam("y","-17");
MenuBar.hide();
}
}
System.onKeyDown(String k) {
if (menubar_main_attrib.getData() == "0") return;
Layout l = getScriptGroup().getParentLayout();
if (!l.isActive()) return;
if (k == "alt+f") {
getScriptGroup().findObject("File.menu").sendAction("open", "", 0, 0, 0, 0);
complete;
}
if (k == "alt+p") {
getScriptGroup().findObject("Play.menu").sendAction("open", "", 0, 0, 0, 0);
complete;
}
if (k == "alt+o") {
getScriptGroup().findObject("Options.menu").sendAction("open", "", 0, 0, 0, 0);
complete;
}
if (k == "alt+i") {
getScriptGroup().findObject("View.menu").sendAction("open", "", 0, 0, 0, 0);
complete;
}
if (k == "alt+h") {
getScriptGroup().findObject("Help.menu").sendAction("open", "", 0, 0, 0, 0);
complete;
}
}